import logging
#输出格式和添加一些公共信息
logging.basicConfig(format="%(asctime)s|%(levelname)s|%(filename)s:%(lineno)s|%(message)s",
                    datefmt="%Y-%m-%d %H:%M:%S",level=logging.DEBUG)
name="张三"
age=18
logging.debug("姓名 %s,年龄 %d",name,age)
logging.warning("姓名 %s,年龄 %d",name,age)




# name="梁晨"
# print("你好%s"%(name))